package com.t7;

/**
 * Created by xuyiwei on 2018/7/18.
 */
class simple{
    private String s;

    public simple(String s) {
        this.s = s;
    }

    public String getS() {
        return s;
    }

    public void setS(String s) {
        this.s = s;
    }
}
public class Lay {

    private String t;

    private simple simple;

    public Lay(String t) {
        this.t = t;
    }

    public void check(){
        if(this.simple ==null){
            System.out.println("simple还没初始化");
        }else{
            System.out.println("simple已经初始化");
        }
    }

    public void lay(){
        if(simple==null){
            simple = new simple("sss");
        }
    }

    public com.t7.simple getSimple() {
        return simple;
    }

    public void setSimple(com.t7.simple simple) {
        this.simple = simple;
    }

    public String getT() {
        return t;
    }

    public void setT(String t) {
        this.t = t;
    }

    public static void main(String[] args) {
        Lay lay = new Lay("1");
        lay.check();
        lay.lay();
        lay.check();
    }
}
